<%@ page import="com.onlineOrder.bean.indentList" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 12296
  Date: 2022/3/15
  Time: 10:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>我的订单</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" >
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" >
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" ></script>
</head>
<body>
<div class="container row=10">
    <table class="table table-striped table-hover">
        <tbody>
        <tr>
            <th>     </th>
            <th>菜品名</th>
            <th>总金额</th>
            <th>订餐用户</th>
            <th>订餐时间</th>
            <th>状态</th>
        </tr>

        <%
            List<indentList> indentLists = (List<indentList>) request.getAttribute("buyLists");

            int i=0;
            for (indentList indentList : indentLists) {
                String state="未支付";
                if (indentList.getState().equals("1")){
                    state="已支付";
                }
        %>

        <tr>
            <td><%=++i%></td>
            <td><%=indentList.getMenus()%></td>
            <td><%=indentList.getAmount()%></td>
            <td><%=indentList.getUserName()%></td>
            <td><%=indentList.getTime()%></td>
            <td><%=state%></td>
        </tr>
        <%
            }
        %>

        </tbody>
    </table>
</div>
</body>
</html>

